<script setup>
import { ref, reactive } from "vue";
const duihua = ref(false)
const data = reactive({
  flag: false,
});

</script>

<template>
  <div class="duihua">
    <button @click="data.flag = !data.flag">点击弹出对话框</button>
    <div class="box" v-show="data.flag">
      <h3>对话框</h3>
      <span>姓名</span>
      <input type="text" name="" id="">
    </div>
  </div>
</template>

<style lang="scss" scoped>
.duihua {
  .box {
    width: 300px;
    height: 200px;
    background: skyblue;
  }
}
</style>
